home *** CD-ROM | disk | FTP | other *** search
- unit Unit1;
-
- interface
-
- uses
- SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, Dialogs;
-
- type
- TForm1 = class(TForm)
- procedure FormCreate(Sender: TObject);
- private
- { Private declarations }
- procedure AppMinimize(Sender: TObject);
- public
- { Public declarations }
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- {$R *.DFM}
-
- procedure TForm1.FormCreate(Sender: TObject);
- begin
- Application.OnMinimize := AppMinimize;
- end;
-
- procedure TForm1.AppMinimize(Sender: TObject);
- begin
- if FormStyle = fsStayOnTop then
- SetWindowPos(Application.Handle, HWnd_TopMost, 0, 0, 0, 0,
- SWP_NoActivate or SWP_NoSize or SWP_NoMove);
- end;
-
- end.
-